<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" type="text/css" href="/static/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/static/css/fontawesome-all.min.css">
    <link rel="stylesheet" type="text/css" href="https://pixinvent.com/stack-responsive-bootstrap-4-admin-template/app-assets/fonts/simple-line-icons/style.min.css" crossorigin="anonymous">
    <link rel="stylesheet" type="text/css" href="/static/css/custom.css">
    <title>{{if .title}}{{.title}}{{else}}Home{{end}} | WinAFL Pet</title>
</head>
<body>
    <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
        <div class="container">
            <a class="navbar-brand" href="/">
                <i class="fas fa-carrot d-inline-block"></i>
                WinAFL Pet
            </a>

            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>

            <div class="collapse navbar-collapse" id="navbar">
                <ul class="navbar-nav mr-auto">
                    <li class="nav-item active">
                        <a class="nav-link" href="/">Home</a>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Agents</a>
                        <div class="dropdown-menu" aria-labelledby="dropdown01">
                            <a class="dropdown-item" href="/agents/create">Create</a>
                            <a class="dropdown-item" href="/agents/view">View</a>
                        </div>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Jobs</a>
                        <div class="dropdown-menu" aria-labelledby="dropdown01">
                            <a class="dropdown-item" href="/jobs/create">Create</a>
                            <a class="dropdown-item" href="/jobs/view">View</a>
                        </div>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="/crashes/view">Crashes</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="/user/edit">Profile</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="/user/logout">
                            <i class="fas fa-sign-out-alt"></i>
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
    <main role="main" class="container">
    {{if .title}}<h1>{{.title}}</h1>{{end}}
    <div id="alert" class="alert alert-{{if .context}}{{.context}}{{else}}empty{{end}} alert-dismissible fade show" role="alert">
        <div class="message">{{.alert}}</div>
        <button type="button" class="close" aria-label="Close">
            <span aria-hidden="true">&times;</span>
        </button>
    </div>
    <div id="wait" class="d-flex justify-content-center">
        <div class="spinner-border" role="status">
            <span class="sr-only">Loading...</span>
        </div>
    </div>
    {{template "content" .}}
    </main>
    <footer class="footer">
      <div class="container">
        <p class="float-left text-muted text-left">&copy; 2020 Gabor Seljan</p>
        <p class="float-right text-muted text-right">Version {{ getVersion }}</p>
      </div>
    </footer>
    <script src="/static/js/popper.min.js" type="text/javascript" charset="utf8"></script>
    <script src="/static/js/jquery.min.js" type="text/javascript" charset="utf8"></script>
    <script src="/static/js/bootstrap.bundle.min.js" type="text/javascript" charset="utf8"></script>
    <script src="/static/js/bootstrap.min.js" type="text/javascript" charset="utf8"></script>
    <script src="/static/js/jquery-succinct-min.js" type="text/javascript" charset="utf8"></script>
    <script src="/static/js/custom.js" type="text/javascript" charset="utf8"></script>
</body>
</html>
